<template>
	<div class="Index">
		<header>
			<span>扫码软件</span>
		</header>
		<div class="container">
			<div class='option'>
				<router-link  to="/EnterWare">
					<i class="iconfont icon-saomiao"></i>
					<span>ZA/B/C补码</span>
				</router-link>
				<router-link  to="/EnterWarez">
					<i class="iconfont icon-saomiao"></i>
					<span>ZD/E补码</span>
				</router-link>
<!-- 				<router-link :to="{name:'BlindScan', query:{pagetype:'air'}}" >
					<i class="iconfont icon-saomiao"></i>
					<span>盲扫</span>
				</router-link>
				<router-link to="/QueryOrder" >
					<i class="iconfont icon-sousuoxiawu-"></i>
					<span>运单查询</span>
				</router-link> -->
				<!-- 				<router-link to="/SortScan" v-if="userInfo.xianChangFlag">
					<i class="iconfont icon-sousuoxiawu-"></i>
					<span>分拣扫描</span>
				</router-link>
				<router-link to="/OrderManagement" v-if="userInfo.xianChangFlag">
					<i class="el-icon-s-grid"></i>
					<span>工单管理</span>
				</router-link>
				<router-link to="/OrderFinish" v-if="userInfo.xianChangFlag">
					<i class="el-icon-s-claim"></i>
					<span>工单完结</span>
				</router-link> -->
<!-- 				<router-link to="/ReportAbnormal" >
					<i class="iconfont icon-yichang"></i>
					<span>异常入库</span>
				</router-link> -->
<!-- 				<router-link to="/ReportAbnormalCC" v-if="userInfo.xianChangFlag">
					<i class="iconfont icon-yichang"></i>
					<span>串仓退回</span>
				</router-link>
				<router-link to="/ReportAbnormalYC" v-if="userInfo.xianChangFlag">
					<i class="iconfont icon-yichang"></i>
					<span>异常退回</span>
				</router-link>
				<router-link to="/OrderListDriver" v-if="userInfo.driverFlag">
					<i class="el-icon-s-fold"></i>
					<span>运输任务(司机)</span>
				</router-link>
				<router-link to="/OrderList" v-if="userInfo.xianChangFlag">
					<i class="el-icon-s-fold"></i>
					<span>运输任务(现场)</span>
				</router-link> -->
				<router-link to="/EnterWarehouse" >
					<i class="el-icon-printer"></i>
					<span>三段码</span>
				</router-link>
<!-- 				<router-link to="/MoveWarehouse" v-if="userInfo.xianChangFlag">
					<i class="el-icon-sort"></i>
					<span>移库</span>
				</router-link>
				<router-link to="/AbnormalMove" v-if="userInfo.xianChangFlag">
					<i class="el-icon-sort"></i>
					<span>异常移库</span>
				</router-link> -->
<!-- 				<router-link to="/OutWarehouse" v-if="userInfo.xianChangFlag">
					<i class="el-icon-upload2"></i>
					<span>出库</span>
				</router-link>
				<router-link to="/InventoryList" v-if="userInfo.xianChangFlag">
					<i class="el-icon-s-ticket"></i>
					<span>库存查询</span>
				</router-link>
				<router-link to="/TimeOutInventoryList" v-if="userInfo.xianChangFlag">
					<i class="el-icon-timer"></i>
					<span>超时库存</span>
				</router-link>
				<router-link to="/InventoCryCheck" v-if="userInfo.xianChangFlag">
					<i class="el-icon-tickets"></i>
					<span>库存盘点</span>
				</router-link> -->
				<!-- <router-link :to="{name:'OrderScanCar',query:{pagetype:'air'}}" v-if="userInfo.xianChangFlag">
					<i class="iconfont icon-saomiao"></i>
					<span>装车扫描</span>
				</router-link>
				<router-link to="/GenerateBarCode">
					<i class="el-icon-printer"></i>
					<span>生成条形码</span>
				</router-link>
				<router-link to="/CustomerBarCode" v-if="userInfo.xianChangFlag">
					<i class="el-icon-printer"></i>
					<span>打印客户条码</span>
				</router-link>
				<router-link to="/BiSpectaculars" v-if="userInfo.xianChangFlag">
					<i class="el-icon-pie-chart"></i>
					<span>卸货预警</span>
				</router-link> -->
				<!-- 现场 -->
				<!-- <router-link v-if="userInfo.diaoDuFlag">
					<i class="el-icon-s-fold"></i>
					<span>运输调度</span>
				</router-link> -->
			</div>
		</div>
		<!-- <FooterIndex /> -->
		<!-- <div v-if="ifTips" class="msg_tips">
			<div class="tips_content">
				<i class="iconfont icon-chenggong1"></i>
				<p>下载中<dot>...</dot></p>
			</div>
		</div>
		<div class="Navigate_MultiAddress" v-if="typeMShow">
			<div>
			<div class="SelectTitle">发现新版本，是否更新!</div>
			<div class="cancel" @click="selelctNo()">取消</div>
			<div class="cancel" @click="selectconfirm()">确认</div>
			</div>
		</div> -->
	</div>
</template>
<script type="text/javascript">
    import FooterIndex from '../../components/footer.vue'
    import * as fetchObj from '@/api/index/index'
  	import { getAppMsgCount } from "../../api/api";
	require('../../assets/js/plugins.js');
	export default {
		name: 'Index',
		data() {
			return {
				userInfo: {},
				typeMShow: false,
				ifTips: false,
				versionInfo: {}
			}
		},
		components: {
			FooterIndex
		},
		mounted() {
		},
		created() {
			// CallAndroidOrIOS.getImageChooserType('all');
			var that = this;
			let userInfo= that.$store.state.userInfo;
			this.userInfo = that.$store.state.userInfo;
			this.$store.state.lnventoryCurrentLoc = ''
			if(userInfo && userInfo.userCode){
				try {
					let code = userInfo.tenantCode + '_' +userInfo.userCode
					CallAndroidOrIOS.setJPushAlias(code);
				}
				catch(error) {
					console.log(error)
				}
			}
			// if (this.$store.state.isFirstInApp) {
			// 	this.getAppVersion()
			// }
		},
		methods: {
			getAppVersion () {
				var postData = {
					types: 'android'
				};
				var that = this
				this.httpRequest1('post', '/system/appVersion/queryAppVersion', {"types": 'android'}).then(res => {
					if (res.data.versionNo != that.$store.state.App_Version) {
						that.typeMShow = true
						that.versionInfo = res.data
						that.$store.state.isFirstInApp = false
					}
					// that.userList = res.data
				})
			},
			selectconfirm () {
				this.typeMShow = false
				CallAndroidOrIOS.UpDateApp(this.versionInfo.downloadUrl);
				// CallAndroidOrIOS.callAndroid("更新APP", this.versionInfo.downloadUrl);
			},
			selelctNo () {
				this.typeMShow = false
			},
		}
	}
</script>
<style lang="less" scoped>
	@import '../../components/publicLess.less';
	.Index {
		height: 100%;
		overflow: hidden;
		header div{
			position: absolute;
			top: 0;
			right: 20/50rem;
		}
		.container {
			height: 100%;
			overflow: scroll;
			.option {
				width: 100%;
				overflow: hidden;
				margin-top: 10px;
				margin-bottom: 4.22rem;
				// background-color: #F4F4F4;
				& > a {
					width: 25%;
					// border: 1px solid #CCC;
					// width: 24.625%;
					height: 160/50rem;
					float: left;
					line-height: 65/50rem;
					margin-right: 0.5%;
					margin-bottom: 0.5%;
					background-color: #fff;
					text-align: center;
					color: #000;
					border-left: 0;
					i {
						font-size: 65/50rem;
						color: @PublicColor;
						display: block;
						margin-top: 28/50rem;
						&.icon-saomiao {
							font-size: 55/50rem;
						}
					}
					&:nth-child(2),
					&:nth-child(4),
					&:nth-child(6),
					&:nth-child(8),
					&:nth-child(10),
					&:nth-child(12),
					&:nth-child(14),
					&:nth-child(16),
					&:nth-child(18),
					&:nth-child(20),
					&:nth-child(22)   {
						margin-right: 0;
						border-left: 0;
						border-right: 0;
					}
					&>span {
						font-size: 27/50rem;
					}
				}
			}
		}
	}
</style>
